package com.example.springbootcourse.pojo;

import javax.validation.constraints.NotNull;

public class User {
    @NotNull(message = "【编号】不能为空")
    private String id;
    @NotNull(message = "【姓名】不能为空")
    private String name;

    private String sex;

    private String mobile;

    private String roleid;

    private String password;

    private String type;

    public User(String id, String name, String sex, String mobile, String roleid, String password, String type) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.mobile = mobile;
        this.roleid = roleid;
        this.password = password;
        this.type = type;
    }

    public User() {
        super();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public String getRoleid() {
        return roleid;
    }

    public void setRoleid(String roleid) {
        this.roleid = roleid == null ? null : roleid.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", mobile='" + mobile + '\'' +
                ", roleid='" + roleid + '\'' +
                ", password='" + password + '\'' +
                ", type='" + type + '\'' +
                '}';
    }
}